<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title> {$action} | {:get_opinion('title')}</title>

    <include file="Public:head"/>

</head>
<body class="skin-blue">

{:W('Common/header')}

<div class="wrapper row-offcanvas row-offcanvas-left">
    {:W('Common/sideMenu')}


    <!-- Right side column. Contains the navbar and content of the page -->
    <aside class="right-side">
        <!-- Content Header (Page header) -->


        <section class="content-header">
            <h1>
                {$action}
                <small>{:get_opinion('title')}</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="{$module_url}"><i class="fa fa-dashboard"></i> {$module}</a></li>
                <li class="active">{$action}</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">

            <div class="row">
                <div class="col-md-12">

                    <!-- /.box-header -->
                    <div class="box-body">

                        <form method="POST" action="{:U('Admin/Posts/indexHandle')}" id="posts">
                            <div class="portlet-body">
                                <div class="row">

                                    <div class="col-md-5">
                                        <div class="btn-group">

                                            <a class="btn btn-info" href="{:U('Admin/Posts/emptyDraftHandle')}"
                                               onclick="javascript:return a_confirm()">
                                                清空草稿箱
                                            </a>
                                        </div>


                                        <div class="btn-group">
                                            <button type="submit" class="btn btn-danger" name="delAll" value='1'><i
                                                    class="icon-remove icon-white"
                                                    onclick="javascript:return a_confirm()">
                                            </i> 批量删除
                                            </button>
                                        </div>

                                    </div>


                                    <div class="col-md-3">
                                        <include file="Public:page"/>
                                    </div>

                                    <div class="col-md-3">
                                        <include file="Public:search"/>
                                    </div>


                                </div>

                                <div class="clearfix">

                                </div>


                                <table class="table table-striped table-bordered table-hover"
                                       id="sample_1">
                                    <thead>
                                    <tr>
                                        <th style="width: 8px;"><input type="checkbox"
                                                                       class="group-checkable"
                                                                       id="check-all"
                                                                       data-set="#sample_1 .checkboxes"/>
                                        </th>
                                        <th>标题</th>
                                        <th style="width:100px;">作者</th>
                                        <th class="col-md-4">分类</th>
                                        <th class="col-md-2">发布日期</th>
                                        <th class="col-md-2">操作</th>

                                    </tr>
                                    </thead>
                                    <tbody>
                                    <foreach name="posts" item="v">
                                        <tr class="odd gradeX">
                                            <td><input type="checkbox" class="checkboxes" value="{$v['post_id']}"
                                                       name="posts[]"/>
                                            </td>
                                            <td><a
                                                    href="{:U('Admin/Posts/posts', array('id' => $v[post_id]))}"
                                                    title="{$v.post_title}">{$v.post_title}</a></td>
                                            <td><a
                                                    href="{:U('Admin/access/edituser', array('aid' => $v['post_user']['user_id']))}">{$v.post_user.user_nicename}</a>
                                            </td>
                                            <td>


                                                分类:
                                                <volist name="v['post_cat']" id="v_pcs" empty="无分类" offset="0"
                                                        length='5'>
                                                    <a
                                                            href="{:U('Admin/Posts/category', array('id' => $v_pcs['cat_id']))}">{$v_pcs['cat_name']}</a>&nbsp;&nbsp;
                                                </volist>

                                                <!--标签:
                                                <volist name="v['post_tag']" id="v_pts" empty="无标签" offset="0"
                                                        length='5'>
                                                    <a
                                                            href="{:U('Admin/Posts/tag', array('id' => $v_pts['tag_id']))}">{$v_pts['tag_name']}</a>&nbsp;&nbsp;
                                                </volist>-->

                                            </td>
                                            <td>{:getTimestamp($v['post_date'],'Y-m-d H:i') }</td>
                                            <td>
                                                <a class="btn btn-primary"
                                                   href="{:U('Admin/Posts/posts', array('id' => $v['post_id']))}">编辑</a>
                                                &nbsp;
                                                <a class="btn btn-danger"
                                                   href="{:U('Admin/Posts/preDel', array('id' => $v[post_id]))}">删除</a>


                                            </td>


                                        </tr>
                                    </foreach>
                                    </tbody>
                                </table>
                                <div>
                                    <ul class="pagination"> {$pager}</ul>
                                </div>

                            </div>

                        </form>


                    </div>
                </div>
            </div>


        </section>
        <!-- /.content -->
    </aside>
    <!-- /.right-side -->
</div>
<!-- ./wrapper -->

<include file="Public:foot"/>

</body>
</html>